import App from './App'
//验证
import validate from './common/validate.js'
//VUEX加载
import store from './store'
//工具
import util from "./common/util.js"
//自定义全局组件
import myBar from './components/my-bar/my-bar.vue'
import myTabBar from './components/my-tabbar/my-tabbar.vue'

import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	// 挂载到全局
	app.config.globalProperties.$validate = validate
	app.config.globalProperties.$util = util
	app.use(store);//https://uniapp.dcloud.io/tutorial/migration-to-vue3.html#插件使用
	app.component('my-bar',myBar)
    app.component('my-tabbar', myTabBar)
	return {
		app
	}
}
